discard
//set trace on
drop _all

********************************************************************************
********************************************************************************
***************** IMPORTANT WARNING: this do-file will ONLY run  ***************
***************** if the directory files are set correctly; this ***************
***************** involves setting the "cd" below, AS WELL AS    ***************
***************** the directory in the file "doLCA.ado"...to set ***************
***************** scroll to the bottom and find line that reads  ***************
***************** "program lca, plugin using("file\lca.dll") and ***************
***************** replace file with the folder location. more    ***************
***************** info is available to troubleshoot in LCA.pdf   ***************
********************************************************************************
********************************************************************************

*cd must be root location for "LCA" folder; for example:
cd "C:\Users\nicholasdavis\Desktop\baylor religion\do files\LCA"
use "baylor_relig_W3"


*2-class
doLCA absoluteD_lca criticalD_lca fatherlyD_lca punishingD_lca justD_lca wrathfulD_lca forgivingD_lca severeD_lca involvedinworldD_lca angeredbyhumansinD_lca godneverfailsD_lca, ///
      nclass(2) ///
	  seed(100000) ///
	  seeddraws(100000) ///
	  categories(2 2 2 2 2 2 2 2 2 2 2)  ///
	  weight(weight)  ///
	  criterion(0.000001)  ///
	  rhoprior(1.0)
	  
return list
matrix list r(gamma)
matrix list r(gammaSTD)
//matrix list r(rho)
//matrix list r(rhoSTD)

*3-class
doLCA absoluteD_lca criticalD_lca fatherlyD_lca punishingD_lca justD_lca wrathfulD_lca forgivingD_lca severeD_lca involvedinworldD_lca angeredbyhumansinD_lca godneverfailsD_lca, ///
      nclass(3) ///
	  seed(100000) ///
	  seeddraws(100000) ///
	  categories(2 2 2 2 2 2 2 2 2 2 2)  ///
	  weight(weight)  ///
	  criterion(0.000001)  ///
	  rhoprior(1.0)
	  
return list
matrix list r(gamma)
matrix list r(gammaSTD)
//matrix list r(rho)
//matrix list r(rhoSTD)

*4-class
doLCA absoluteD_lca criticalD_lca fatherlyD_lca punishingD_lca justD_lca wrathfulD_lca forgivingD_lca severeD_lca involvedinworldD_lca angeredbyhumansinD_lca godneverfailsD_lca, ///
      nclass(4) ///
	  seed(100000) ///
	  seeddraws(100000) ///
	  categories(2 2 2 2 2 2 2 2 2 2 2)  ///
	  weight(weight)  ///
	  criterion(0.000001)  ///
	  rhoprior(1.0)
	  
return list
matrix list r(gamma)
matrix list r(gammaSTD)
//matrix list r(rho)
//matrix list r(rhoSTD)

*5-class
doLCA absoluteD_lca criticalD_lca fatherlyD_lca punishingD_lca justD_lca wrathfulD_lca forgivingD_lca severeD_lca involvedinworldD_lca angeredbyhumansinD_lca godneverfailsD_lca, ///
      nclass(5) ///
	  seed(100000) ///
	  seeddraws(100000) ///
	  categories(2 2 2 2 2 2 2 2 2 2 2)  ///
	  weight(weight)  ///
	  criterion(0.000001)  ///
	  rhoprior(1.0)
	  
return list
matrix list r(gamma)
matrix list r(gammaSTD)
//matrix list r(rho)
//matrix list r(rhoSTD)

*6-class
doLCA absoluteD_lca criticalD_lca fatherlyD_lca punishingD_lca justD_lca wrathfulD_lca forgivingD_lca severeD_lca involvedinworldD_lca angeredbyhumansinD_lca godneverfailsD_lca, ///
      nclass(6) ///
	  seed(100000) ///
	  seeddraws(100000) ///
	  categories(2 2 2 2 2 2 2 2 2 2 2)  ///
	  weight(weight)  ///
	  criterion(0.000001)  ///
	  rhoprior(1.0)
	  
return list
matrix list r(gamma)
matrix list r(gammaSTD)
//matrix list r(rho)
//matrix list r(rhoSTD)

*7-class
doLCA absoluteD_lca criticalD_lca fatherlyD_lca punishingD_lca justD_lca wrathfulD_lca forgivingD_lca severeD_lca involvedinworldD_lca angeredbyhumansinD_lca godneverfailsD_lca, ///
      nclass(7) ///
	  seed(100000) ///
	  seeddraws(100000) ///
	  categories(2 2 2 2 2 2 2 2 2 2 2)  ///
	  weight(weight)  ///
	  criterion(0.000001)  ///
	  rhoprior(1.0)
	  
return list
matrix list r(gamma)
matrix list r(gammaSTD)
//matrix list r(rho)
//matrix list r(rhoSTD)




